package cn.tedu.demo4.pojo;

/**
 * 实体类
 * 这种类一般用于表示数据库中某张表的数据
 *
 * 设计原则：
 * 类名应当与表名一致
 * 属性名与表中的字段名一致
 *
 * 例如：
 * 当前类UserInfo用于表示数据库中userinfo表
 * 类中的属性与userinfo表中的字段一致
 */
public class UserInfo {
    private Integer id;
    private String username;
    private String password;
    private String nickname;
    private Integer age;

    public UserInfo() {
    }

    public UserInfo(Integer id, String username, String password, String nickname, Integer age) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.nickname = nickname;
        this.age = age;
    }

    @Override
    public String toString() {
        return "UserInfo{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", age=" + age +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
